package cn.stylefeng.guns.modular.auth.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;


/**
 * 账号表，电商公司里一个员工就对应着一个账号，每个账号给分配多个角色，同时这个账号也可以给分配多个权限
 * @author allen
 * @date 2021/4/12 10:07
 * @version 1.0
 */


@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "auth_account")
public class AuthAccountEntity implements Serializable {
    /**
     * 主键，自增长
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 用户名，英文，默认是姓名的小写拼音
     */
    @TableField(value = "username")
    private String username;

    /**
     * 账号的密码
     */
    @TableField(value = "`password`")
    private String password;

    /**
     * 员工姓名，中文
     */
    @TableField(value = "`name`")
    private String name;

    /**
     * 账号的说明备注
     */
    @TableField(value = "remark")
    private String remark;

    /**
     * 账号的创建时间
     */
    @TableField(value = "gmt_create")
    private Date gmtCreate;

    /**
     * 账号的更新时间
     */
    @TableField(value = "gmt_modified")
    private Date gmtModified;

    private static final long serialVersionUID = 1L;

    public static final String COL_ID = "id";

    public static final String COL_USERNAME = "username";

    public static final String COL_PASSWORD = "password";

    public static final String COL_NAME = "name";

    public static final String COL_REMARK = "remark";

    public static final String COL_GMT_CREATE = "gmt_create";

    public static final String COL_GMT_MODIFIED = "gmt_modified";
}